package com.logic.modular.game.battle.process.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 普攻信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OrdinaryAttackInfo {
    private Long troops;
    private Reason reason;
    private Boolean isSuccessful;
    private Long targetPlayerHeroId;
    private Long hurt;
    private Long targetTroops;
    public List<SkillReleaseInfo> skill4 = new ArrayList<>();
    public List<EffectTriggerInfo> skillEffectTriggerInfoList = new ArrayList<>();

    public void addHurt(Long hurt) {
        if (hurt != null) {
            if (this.hurt == null) {
                this.hurt = 0L;
            }
            this.hurt += hurt;
        }
    }
}
